﻿
using BCCommon;
using BCCommon.Enums;
using BCCommon.TradingEnums;
using BCData.Trading.SaleContract;
using BCDto.Common.Payment.PaymentRecord;
using BCDto.Trading.SaleContract;
using BCEntity.Trading.SaleContract;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.Trading.SaleContract
{
    /// <summary>
    /// 销售合同
    /// </summary>
    public interface ISaleContractService
    {
        #region  成员方法
        /// <summary>
        /// 是否存在此记录
        /// </summary>
        /// <param name="saleContractId">销售合同Id</param>
        bool Exists(long saleContractId);
        /// <summary>
        /// 添加销售合同
        /// </summary>
        /// <param name="requestDto">销售合同信息</param>
        SaleContractDto Add(SaleContractRequestDto requestDto);
        /// <summary>
        /// 更新销售合同
        /// </summary>
        /// <param name="putDto">销售合同信息</param>
        SaleContractDto Update(SaleContractPutDto putDto);
        /// <summary>
        /// 删除销售合同
        /// </summary>
        /// <param name="saleContractId">销售合同Id</param>
        bool Delete(long saleContractId);
        /// <summary>
        /// 获取销售合同
        /// </summary>
        /// <param name="saleContractId">销售合同Id</param>
        SaleContractDto Get(long saleContractId);
        /// <summary>
        /// 获取销售合同列表
        /// </summary>
        /// <param name="userId">用户Id</param>
        IEnumerable<SaleContractDto> GetList(long userId);
        /// <summary>
        /// 获取销售合同分页列表
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <param name="saleContractStatus">销售合同状态</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">销售合同每页数据条数</param>
        PageableList<SaleContractDto> Query(long? userId, SaleContractStatusType? saleContractStatus, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
        #region 支付销售金额
        /// <summary>
        /// 支付销售金额
        /// </summary>
        /// <param name="paymentRecordDto">支付记录信息</param>
        void PaymentSaleAmount(PaymentRecordDto paymentRecordDto);
        #endregion
    }
}